package com.jilijili.mapper.repository;

import com.jilijili.pojo.mo.MessageMo;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @BelongsProject: jilijili-red-book-dev
 * @BelongsPackage: com.jilijili.mapper.repository
 * @Author: ljj
 * @CreateTime: 2022-04-09  11:41
 * @Description: TODO
 * @Version: 1.0
 */

@Repository
public interface MsgRepository extends MongoRepository<MessageMo, String> {

    // 自定义查询
    public abstract List<MessageMo> findALLByToUserIdOrderByCreateTime(String toUserId, Pageable pageable);


    // 删除
    public abstract void deleteByFromUserIdAndToUserId(String fromUserId,String toUserId);



}
